from litemall_0805.frame.pages.base_page import BasePage
from selenium.webdriver.common.by import By


class LoginPage(BasePage):
    """
    实现登录功能
    """
    def login(self):
        self.do_send_keys("admin123", By.NAME, "username")
        self.do_send_keys("admin123", By.NAME, "password")
        self.do_click(By.CLASS_NAME, "el-button--primary")

        from litemall_0805.frame.pages.home_page import HomePage
        return HomePage(self.driver)
